import {
  createRouter,
  createWebHashHistory
} from 'vue-router'

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/login',
      component: () => import('@/views/login/LoginPage.vue')
    },
    {
      path: '/',
      component: () =>
        import('@/views/layout/LayoutPage.vue'),
      redirect: '/home/homeIndex',
      children: [
        {
          path: 'home/homeIndex',
          component: () =>
            import('@/views/home/HomePage.vue')
        },
        {
          path: 'patient/patientManage',
          component: () =>
            import('@/views/patient/PatientManagePage.vue')
        },
        {
          path: 'scheme/SchemeDesign',
          component: () =>
            import(
              '@/views/scheme_design/SchemeDesignPage.vue'
            )
        },
        {
          path: 'doctor/doctorManage',
          component: () =>
            import('@/views/doctor/DoctorManage.vue')
        },
        {
          path: 'classify/doctorClassify',
          component: () =>
            import(
              '@/views/classify/DoctorClassifyPage.vue'
            )
        },
        {
          path: 'classify/patientClassify',
          component: () =>
            import(
              '@/views/classify/PatientClassifyPage.vue'
            )
        }
      ]
    }
  ]
})

export default router
